/**
* 
* Copyright [2007] [Sunny Liu]
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*       http://www.apache.org/licenses/LICENSE-2.0
*
*   Unless required by applicable law or agreed to in writing, software
*   distributed under the License is distributed on an "AS IS" BASIS,
*   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*   See the License for the specific language governing permissions and
*   limitations under the License.
*/
package ${appConfig.outputPackageName}.xml;

import java.io.IOException;
import java.io.OutputStream;

public interface ObjectXMLSerializer 
{
	public final static String XML_RESPONSE_ROOT    = "response";
	public final static String XML_RESPONSE_HEADER  = "header";
	public final static String XML_RESPONSE_STATUS  = "status";
	public final static String XML_RESPONSE_MESSAGE = "message";
	public final static String XML_RESPONSE_DATA    = "data";
	public final static String XML_RESPONSE_ACTION  = "action";
	public final static String DEFAULT_ERROR_MESSAGE = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><response><status>599</status><message>NULL reponse</message></response>";
	
	public void serialize(Object object, OutputStream out) throws IOException;
	
	
	public void serialize(int action, 
							int status, String message, 
								Object object, OutputStream out) 
												throws IOException;
	public void serialize(int action, 
			int status, String message, 
				 OutputStream out) 
								throws IOException;
	
	public Class supportedObject();
	
}